package com.mingzhi.forum.service;

import com.mingzhi.forum.model.ArticleReply;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 回复帖子
 */
public interface IArticleReplyService {

    /**
     * 帖子下面新增回复
     * @param articleReply 回复信息对象
     */
    @Transactional //开启事务
    void create(ArticleReply articleReply);

    /**
     * 根据帖子id 查询所有回复
     * @param articleId 帖子id
     * @return
     */
    List<ArticleReply> selectByArticleId(@Param("articleId") Long articleId);
}
